-
Notifications
You must be signed in to change notification settings - Fork 471
Add --warn-error to Rewatch #7916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
@cknitt you can already try this out. |
Should we have |
I'm against this idea. These hacks aren't worth it to me. It's a major version; adding a single dash is not the end of the world. Is there any evidence this is a widely used feature? For free software, I think it's a small price to pay. |
@nojaf Thanks! Just tested, and works great. 🎉 |
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for a --warn-error
command-line flag to the build
and watch
commands in Rewatch, allowing users to override warning configurations from rescript.json
. The flag follows the same precedence behavior as the legacy bsb build system.
- Adds
--warn-error
CLI flag to bothbuild
andwatch
commands - Implements warning override logic that takes precedence over
rescript.json
configuration - Threads the warning parameter through the entire build system from CLI to compiler argument generation
- Includes comprehensive test coverage and integration tests
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
rewatch/src/cli.rs | Adds --warn-error field to BuildArgs and WatchArgs structs |
rewatch/src/main.rs | Passes the warn_error parameter to build and watch functions |
rewatch/src/watcher.rs | Updates watcher to accept and thread the warn_error parameter |
rewatch/src/config.rs | Implements warning override logic and adds comprehensive unit tests |
rewatch/src/build/ | Updates build system components to handle the new BuildCommandState wrapper |
rewatch/tests/compiler-args.sh | Adds integration test to verify warning flags appear in both parser and compiler args |
rewatch/testrepo/packages/namespace-casing/rescript.json | Adds test configuration with warning settings |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Fixes #7718